package com.moxiao.yfjh.module.order.controller.admin.brokeragerecord.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import javax.validation.constraints.*;

import org.springframework.format.annotation.DateTimeFormat;

import static com.moxiao.yfjh.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 相亲佣金记录 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class BlindBrokerageRecordBaseVO {

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "32270")
    @NotNull(message = "用户编号不能为空")
    private Long userId;

    @Schema(description = "业务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23208")
    @NotNull(message = "业务编号不能为空")
    private String bizId;

    @Schema(description = "业务类型：1-订单，2-提现", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "业务类型：1-订单，2-提现不能为空")
    private Byte bizType;

    @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "标题不能为空")
    private String title;

    @Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "14352")
    @NotNull(message = "金额不能为空")
    private BigDecimal price;

    @Schema(description = "当前总佣金", requiredMode = Schema.RequiredMode.REQUIRED, example = "11275")
    @NotNull(message = "当前总佣金不能为空")
    private BigDecimal totalPrice;

    @Schema(description = "说明", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
    @NotNull(message = "说明不能为空")
    private String description;

    @Schema(description = "状态：0-待结算，1-已结算，2-已取消", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "状态：0-待结算，1-已结算，2-已取消不能为空")
    private Byte status;

    @Schema(description = "冻结时间（天）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "冻结时间（天）不能为空")
    private Integer frozenDays;

    @Schema(description = "解冻时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime unfreezeTime;

    @Schema(description = "来源用户等级", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "来源用户等级不能为空")
    private Integer sourceUserLevel;

    @Schema(description = "来源用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7322")
    @NotNull(message = "来源用户编号不能为空")
    private Long sourceUserId;

}
